#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    //set timer
    ui->label->setText("");
    //ui->label->setText(QTime::currentTime().toString("hh:mm:ss"));
    timer = new QTimer;
    timer->start(10000);

    connect(timer, SIGNAL(timeout()),this, SLOT(updateTime()));

}

void MainWindow::updateTime()
{
    ui->label->setText(QTime::currentTime().toString("hh:mm:ss"));
}





MainWindow::~MainWindow()
{
    delete ui;
}
